<template>
    <span class="demand-had">
        <image-vant
        :width="iconWidth" 
        :height="iconHeight" 
        :src="demandIcon"
        :style="iconStyle"
        class="icon"
        />有需求
    </span>
</template>

<script>
// 自定义方法
import { getProImg } from '_projectFn/images'

// 自定义组件
import ImageVant from "_components/project/common/ImageVant"

// 本地图片
import demand from '_assets/img/demand-had-icon.svg'

export default {
    name: 'DemandIcon',
    props: {
        iconWidth: {
            type: Number,
            default: 15,
        },
        iconHeight: {
            type: Number,
            default: 15,
        },
    },
    data() {
        return {
            demandIcon: getProImg('demand-had-icon.svg', demand),
            iconStyle: {
                top: `${(20 - this.iconHeight) / 2}px`
            }
        }
    },
    components: {
        ImageVant,
    }
}
</script>

<style lang="scss" scoped>
.demand-had {
    cursor: pointer;
    color: #4E8CEE;
    height: 20px;

    .icon {
        position: relative;
    }
}
</style>